import { useDict } from '@/utils/dict/useDict'

export const searchList = [
  {
    type: 'input',
    name: '兼职单位',
    field: '',
  }
]

export const listColumns = [
  {
    title: '兼职单位',
    key: 'organization',
  },
  {
    title: '兼职人',
    key: 'employeeName',
  },
  {
    title: '兼职类型',
    key: 'parttimeTypeName',
  },
  {
    title: '兼职性质',
    key: 'parttimeNatureName',
  },
  {
    title: '工作量(天)',
    key: 'workload',
  },
  {
    title: '兼职周期',
    key: 'startDate',
    render: (item,row) => {
      return row.startDate + '至' + row.endDate
    }
  },
]

export const actionArr = [
  {
    action: 'look',
    value: '查看',
  },
  {
    action: 'edit',
    value: '编辑',
  },
  {
    action: 'del',
    value: '删除',
  }
]
export const btnList = [
  {
    action: 'add',
    value: '新增',
    auth: ''
  }
];

export const rules = {
  organization: [
    { required: true, message: '请输入兼职单位', trigger: 'change' },
  ],
  position: [
    { required: true, message: '请输入兼职岗位', trigger: 'change' },
  ],
  parttimeTypeId: [
    { required: true, message: '请选择兼职类型', trigger: 'change' },
  ],
  parttimeNatureId: [
    { required: true, message: '请选择兼职性质', trigger: 'change' },
  ],
  startDate: [
    { required: true, message: '请选择兼职周期', trigger: 'blur' },
  ],
  workload: [
    { required: true, message: '请输入工作量描述', trigger: 'change' },
  ],
  employeeName: [
    { required: true, message: '请选择兼职人', trigger: 'change' },
  ],
  responsibilities: [
    { required: true, message: '请输入岗位职责描述', trigger: 'change' },
  ],
  achievements: [
    { required: true, message: '请输入工作成果摘要', trigger: 'change' },
  ],
  thirdpartyEvaluation: [
    { required: true, message: '请输入第三方评价', trigger: 'change' },
  ],
  certificationFileId: [
    { required: true, message: '请上传兼职证明', trigger: 'change' },
  ]
}